package com.lagou.dao.impl;

import com.lagou.dao.CourseDao;
import com.lagou.domain.Course_Section;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.jdbc.core.JdbcTemplate;
import org.springframework.stereotype.Repository;

@Repository
public class CourseDaoImpl implements CourseDao {

    @Autowired
    private JdbcTemplate jdbcTemplate;

    public void save(Course_Section section) {
        String sql = "insert into course_section values(null,?,?,?,?,?,?,?,?,?,?,?)";
        jdbcTemplate.update(sql,section.getCourse_id(),section.getSection_name(),
                section.getDescription(),section.getLast_operator(),section.getCreate_time(),
                section.getUpdate_time(),section.getIs_visible(),section.getIsDel(),
                section.getOrder_num(),section.getLast_operator_id(),section.getStatus()
                );

    }
}
